<?php
/**
 * File containing the IncrementProcessor
 *
 * PHP Version 5
 *
 * @category Processors
 * @package  Processors
 * @author   Martin Schlecht <herrlollinger@gmail.com>
 * @license  MIT License
 * @link     http://code.google.com/p/universal-test-data
 */

/**
 * Processor class "IncrementProcessor"
 *
 * Processor which is used to use tags which implements number incrementation within the text.
 *
 * @category   Processors
 * @package    Processors
 * @subpackage IncrementProcessors
 * @author     Martin Schlecht <herrlollinger@gmail.com>
 * @copyright  see @author
 * @license    MIT License
 * @link       http://code.google.com/p/universal-test-data
 *
 * The followings are the available attributes of the processor class
 * @property string $text, the text which should be processed
 */
class Processor
{
	private $text;
	private $whitespace;
	
	/**
	 * The constructor of the Processor class
	 * 
	 * @param String $text, the text which should be processed
	 */
	public function Processor($text) {
		$this->text = $text;
	}
	
	/**
	 * The main method of the processor which proecces the text by calling the specific processors
	 *
	 * @return String, The processed text
	 */	
	public function process() {
		$randomNumberProcessor = new RandomNumberProcessor;
		$this->text = $randomNumberProcessor->process($this->text);
		
		$randomStringProcessor = new RandomStringProcessor;
		$this->text = $randomStringProcessor->process($this->text);
		
		$shuffleStringProcessor = new ShuffleStringProcessor;
		$this->text = $shuffleStringProcessor->process($this->text);
		
		$repeatProcessor = new RepeatProcessor;
		$this->text = $repeatProcessor->process($this->text);
		
		$randomNameProcessor = new RandomNameProcessor;
		$this->text = $randomNameProcessor->process($this->text);
		
		$incrementProcessor = new IncrementProcessor;
		$this->text = $incrementProcessor->process($this->text);
		
		$randomEMailProcessor = new RandomEMailProcessor();
		$this->text = $randomEMailProcessor->process($this->text);
		
		$randomTelephoneNumberProcessor = new RandomTelephoneNumberProcessor();
		$this->text = $randomTelephoneNumberProcessor->process($this->text);
		
		$randomDateProcessor = new RandomDateProcessor();
		$this->text = $randomDateProcessor->process($this->text);
		
		$actualDateProcessor = new ActualDateProcessor();
		$this->text = $actualDateProcessor->process($this->text);
		
		//$randomCreditCardProcessor = new RandomCreditCardNumberProcessor();
		//$this->text = $randomCreditCardProcessor->process($this->text);
		
		return $this->text;
	}
}
?>